<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<!DOCTYPE html>
<head>
    <%@include file="/include/head.jsp"%>
     <title>常用体检人</title>
    <script type="text/javascript">
        var dataListUrl = "${rootPath}/customer/account/contacts/list.do";
        Vue.prototype.showDialogToDeletePopulation=function(id){
            console.log(id)
            mui.confirm('确认删除该体检人信息', ' ',  ['确认', '取消'], function(e) {
                if (e.index == 0) {
                    var url = "${rootPath}/customer/account/delete/contactsDetail.do";
                    $.ajax({
                        cache: true,
                        type: "POST",
                        dataType: "json",
                        url:url,
                        data:{id:id},
                        async: true,
                        error: function(request) {
                            layer.open({
                                skin:"msg",
                                content:"服务器连接失败!",
                                time: 1.5
                            })
                        },
                        success: function(data) {
                            if (data.success) {
                                layer.open({
                                    skin:"msg",
                                    content:data.msg,
                                    time: 1.5
                                })
                                window.location.href = "${rootPath}/customer/account/contacts.do";
                            } else {
                                layer.open({
                                    skin:"msg",
                                    content:data.msg,
                                    time: 1.5
                                })
                            }
                        }
                    });
                }
            })
        }
    </script>
    <script src="${rootPath}/static/js/mui.pullToRefresh.js"></script>
    <script src="${rootPath}/static/js/mui.pullToRefresh.material.js"></script>
    <script src="${rootPath}/static/js/paginationRequest.js"></script>

</head>

<body>
<header class="mui-bar mui-bar-nav qy-bg-white qy-border-bottom">
    <a class="mui-icon mui-icon-back qy-text-black" href="${rootPath}/customer/account/info.do"></a>
    <h1 class="mui-title qy-text-black qy-font-size-20px">常用体检人</h1>
</header>
<nav class="mui-bar mui-bar-tab qy-bg-blue qy-border-top">
    <a class="qy-block qy-font-size-18px qy-text-center qy-text-white qy-full-height qy-font-lineHeight-30px" href="${rootPath}/customer/account/contactsDetail.do?type=0">新增体检人</a>
</nav>



<div class="mui-content">
    <div class="mui-scroll-wrapper">
            <div class="mui-scroll">
                <div class="mui-table-view">
                    <div class="" id="vueListBox0">
                    <div class="mui-loading">
                        <div class="mui-spinner">
                        </div>
                    </div>
                    <div class="mui-row qy-padding-left-14px qy-bg-white qy-margin-top-8px" v-for="contacts in datas">
                        <div class="mui-col-xs-12 qy-text-black qy-font-size-18px qy-padding-top-10px qy-font-weight-bold">{{ contacts.name }}</div>
                        <div class="mui-col-xs-12 qy-font-size-14px qy-padding-top-4px">
                            <small class="qy-text-gray9">手机号</small>
                            <small class="qy-text-black">{{ contacts.phone }}</small>
                        </div>
                        <div class="mui-col-xs-12 qy-font-size-14px qy-padding-horizontal-2px qy-border-bottom">
                            <small class="qy-text-gray9">身份证</small>
                            <small class="qy-text-black">{{ contacts.identity }}</small>
                        </div>
                        <div class="mui-col-xs-12 qy-text-right qy-text-gray9 qy-font-size-14px qy-padding-right-14px qy-padding-horizontal-14px">
                            <a class="qy-margin-right-8px qy-text-gray9" :href="'${rootPath}/customer/account/contactsDetail.do?type=1&id='+contacts.id">
                                <i class="mui-icon mui-icon-compose"></i>
                                编辑
                            </a>
                            <small @click="showDialogToDeletePopulation(contacts.id)">
                                <i class="mui-icon mui-icon-trash"></i>
                                删除
                            </small>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
</html>
<script type="text/javascript" charset="utf-8" src="${rootPath}/static/js/contacts.js"></script>